package com.me.learnspring.repository;

import com.me.learnspring.model.Drink;
import com.me.learnspring.model.Order;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.time.LocalDateTime;
import java.util.List;

public interface DrinkRepository extends JpaRepository<Drink,Long> {
	List<Drink> getDrinksByCategory_Id(Long categoryId);
	
	Drink getDrinksByName(String name);
	
	Page<Drink> getAllByCategory_Id(Long categoryId, Pageable pageable);
}
